<template>
    <div
        class="comment-list"
        :is-pulling="isPulling"
        :disabled="listLength === listLength.length"
        height="100%"
    >
        <template v-if="list.length">
            <comment-item
                v-for="(item, index) in list"
                :key="index"
                :goods-id="goodsId"
                :info="item"
            />
        </template>
        <template v-else :is-icon="true" name="empty-comment" label="暂无评论" color="#ccc" size="50" top="200" />
    </div>
</template>

<script>

export default {
    name: 'CommentList',
    components: {
    },
    data() {
        return {
            list: [],
            listLength: 0,
            state: '',
            goodsId: ''
        }
    },
    created() {
        const { id } = this.$route.query
        if (id) {
            this.goodsId = id
        }
    },
    methods: {

    }
}
</script>

<style scoped>
    .comment-list {
        margin-top: 5px;
    }
</style>
